import redis


class PyRedis:

    def __init__(self, **kwargs):
        self.__db = redis.Redis(**kwargs)

    def sadd(self, key, val):
        self.__db.sadd(key, val)

    def smembers(self, key):
        return self.__db.smembers(key)

    def exp(self, key, time):
        self.__db.expire(key, time)

    def scard(self, key):
        return self.__db.scard(key)
